home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Online / cnetdevice / src / include / pcmcia.i < prev    next >
Text File  |  2000-05-06  |  4KB  |  158 lines

  1. ; pcmcia includes
  2.  
  3. ; History
  4. ;
  5. ;    6-5-00  -  Replaced cah_ and dtd_ with ALIGNWORD. - HSMOD
  6.  
  7.  STRUCTURE    CardHandle,0
  8.     STRUCT    cah_CardNode,LN_SIZE
  9.     APTR    cah_CardRemoved
  10.     APTR    cah_CardInserted
  11.     APTR    cah_CardStatus
  12.     UBYTE    cah_CardFlags
  13.     ALIGNWORD
  14.     LABEL    CardHandle_SIZEOF
  15.  
  16. cah_sizeof = cardhandle_sizeof
  17.  
  18.  STRUCTURE    DeviceTData,0
  19.     ULONG    dtd_DTsize            ;Size of card (bytes)
  20.     ULONG    dtd_DTspeed            ;Speed of card in nanoseconds
  21.     UBYTE    dtd_DTtype            ;Type of card
  22.     UBYTE    dtd_DTflags            ;other flags
  23.     ALIGNWORD
  24.     LABEL    DeviceTData_SIZEOF
  25.  
  26.  
  27. CISTPL_DEVICE    = $01   ; device descriptor, common memory
  28. CISTPL_INFO_V1   = $15   ; information
  29. CISTPL_CONF_MAP  = $1A   ; Card Configuration map
  30. CISTPL_CONFIG    = $1B   ; Card Configuration entry
  31. CISTPL_MANUF_ID  = $20   ; manufacturer's ID
  32. CISTPL_FUNC_ID   = $21   ; function of card
  33.  
  34. CISTPL_FUNCID_MULTI     = $00
  35. CISTPL_FUNCID_MEMORY    = $01
  36. CISTPL_FUNCID_SERIAL    = $02
  37. CISTPL_FUNCID_PARALLEL  = $03
  38. CISTPL_FUNCID_FIXED     = $04
  39. CISTPL_FUNCID_VIDEO     = $05
  40. CISTPL_FUNCID_NETWORK   = $06
  41. CISTPL_FUNCID_AIMS      = $07
  42. CISTPL_FUNCID_SCSI      = $08
  43.  
  44.  
  45. DTTYPE_ETHER  = 1
  46.  
  47.  
  48.  STRUCTURE    CardMemoryMap,0
  49.     APTR    cmm_CommonMemory
  50.     APTR    cmm_AttributeMemory
  51.     APTR    cmm_IOMemory
  52.     LABEL    CardMemoryMap_SIZEOF
  53.  
  54. * CardHandle.cah_CardFlags for OwnCard() function
  55.  
  56.     ; The CARDB_RESETREMOVE flag means you want the machine to
  57.     ; perform a HARDWARE RESET if the card in the credit-card slot is
  58.     ; removed while you own the CardSemaphore.
  59.  
  60.     BITDEF    CARD,RESETREMOVE,0    ;Hardware reset on card remove
  61.  
  62.     ; The CARDB_IFAVAILABLE flag means you only want your CardHandle
  63.     ; structure enqueued IF the credit card can be owned immediately.
  64.  
  65.     BITDEF    CARD,IFAVAILABLE,1
  66.  
  67.     ; The CARDB_DELAYOWNERSHIP flag means you never want a successful
  68.     ; return from OwnCard() even if the credit-card is available.  Rather
  69.     ; you will be notified of ownership via your cah_CardInserted
  70.     ; interrupt vector.
  71.  
  72.     BITDEF    CARD,DELAYOWNERSHIP,2
  73.  
  74.     ; The CARDB_POSTSTATUS flag is new for card.resource V39 (check
  75.     ; VERSION in resource base before using).  It tells the resource
  76.     ; that you want your Status Change Interrupt (if provided) to
  77.     ; be called twice in a row.  See OwnCard() for details.
  78.     ;
  79.  
  80.     BITDEF    CARD,POSTSTATUS,3
  81.  
  82. * ReleaseCard() function flags
  83.  
  84.     ; The CARDB_REMOVEHANDLE flag means you want to remove your
  85.     ; CardHandle structure from the list of CardHandle structures
  86.     ; whether or not you own the credit-card in the slot.
  87.  
  88.     BITDEF    CARD,REMOVEHANDLE,0
  89.  
  90. * ReadStatus() return flags
  91.  
  92.     BITDEF    CARD_STATUS,CCDET,6    ; Credit CARD_STATUS detect (1 == detected)
  93.     BITDEF    CARD_STATUS,BVD1,5    ; Battery Voltage Detect 1
  94.     BITDEF    CARD_STATUS,SC,5    ; Credit-CARD_STATUS (internal) status change
  95.     BITDEF    CARD_STATUS,BVD2,4    ; Battery Voltage Detect 2
  96.     BITDEF    CARD_STATUS,DA,4    ; Digital audio
  97.     BITDEF    CARD_STATUS,WR,3    ; Write enable (1 == enabled)
  98.     BITDEF    CARD_STATUS,BSY,2    ; Credit CARD_STATUS Busy
  99.     BITDEF    CARD_STATUS,IRQ,2    ; Interrupt request
  100.  
  101. * CardProgramVoltage() defines
  102.  
  103. CARD_VOLTAGE_0V        EQU    0    ; Set to default; maybe the same as 5V
  104. CARD_VOLTAGE_5V        EQU    1
  105. CARD_VOLTAGE_12V    EQU    2
  106.  
  107. * CardMiscControl() defines
  108.  
  109.     BITDEF    CARD,ENABLE_DIGAUDIO,1
  110.     BITDEF    CARD,DISABLE_WP,3
  111.  
  112. * CardInterface() defines
  113.  
  114. CARD_INTERFACE_AMIGA_0    EQU    0
  115.  
  116. *
  117. * Resource Vector Offsets
  118. *
  119.  
  120. RES_RESERVED    EQU    0
  121. RES_USERDEF    EQU    LIB_BASE-(RES_RESERVED*LIB_VECTSIZE)
  122. RES_NONSTD    EQU    RES_USERDEF
  123.  
  124. RESINIT        MACRO    ; [baseOffset ]
  125.         IFC    '\1',''
  126. COUNT_RES    SET    RES_USERDEF
  127.         ENDC
  128.         IFNC    '\1',''
  129. COUNT_RES    SET    \1
  130.         ENDC
  131.         ENDM
  132.  
  133.  
  134. RESDEF        MACRO    ; library Function Symbol
  135. \1        EQU    COUNT_RES
  136. COUNT_RES    SET    COUNT_RES-LIB_VECTSIZE
  137.         ENDM
  138.  
  139.     RESINIT
  140.     RESDEF    _LVOOwnCard
  141.     RESDEF    _LVOReleaseCard
  142.     RESDEF    _LVOGetCardMap
  143.     RESDEF    _LVOBeginCardAccess
  144.     RESDEF    _LVOEndCardAccess
  145.     RESDEF    _LVOReadCardStatus
  146.     RESDEF    _LVOCardResetRemove
  147.     RESDEF    _LVOCardMiscControl
  148.     RESDEF    _LVOCardAccessSpeed
  149.     RESDEF    _LVOCardProgramVoltage
  150.     RESDEF    _LVOCardResetCard
  151.     RESDEF    _LVOCopyTuple
  152.     RESDEF    _LVODeviceTuple
  153.     RESDEF    _LVOIfAmigaXIP
  154.     RESDEF    _LVOCardForceChange
  155.     RESDEF    _LVOCardChangeCount
  156.     RESDEF    _LVOCardInterface
  157.  
  158.